* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

header {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.mood-selector {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
}

.mood-btn {
    background: none;
    border: 2px solid #eee;
    border-radius: 50%;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mood-btn:hover {
    transform: scale(1.1);
}

.mood-btn.selected {
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.mood-btn:focus {
    outline: none;
}

#mood-description {
    width: 100%;
    min-height: 100px;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    resize: vertical;
}

.tag-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-btn {
    background: #f1f1f1;
    border: none;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-btn:hover {
    background: #e0e0e0;
}

.tag-btn.selected {
    background: #3498db;
    color: white;
}

#custom-tag {
    flex: 1;
    min-width: 120px;
    padding: 0.4rem 1rem;
    border: 1px solid #ddd;
    border-radius: 20px;
}

button[type="submit"] {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: 30px;
    cursor: pointer;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(38, 117, 252, 0.3);
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

#mood-filter {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#generate-insights, #export-csv {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
    color: #333;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

#generate-insights:hover, #export-csv:hover {
    opacity: 0.9;
}

.history-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.mood-display {
    font-size: 1.5rem;
}

.date-display {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.description-display {
    margin-bottom: 0.5rem;
}

.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tag-display {
    background: #e0f7fa;
    color: #00838f;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

#insights-content {
    min-height: 100px;
}

.loading {
    text-align: center;
    padding: 1rem;
    color: #7f8c8d;
}

.insight-report {
    background: #e3f2fd;
    border-radius: 10px;
    padding: 1.5rem;
}

.insight-report h3 {
    color: #0d47a1;
    margin-bottom: 1rem;
}

.insight-section {
    margin-bottom: 1.5rem;
}

.insight-section h4 {
    color: #1565c0;
    margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    .mood-selector {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .mood-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 添加图表区域样式 */
.chart-container {
    position: relative;
    height: 400px;
    margin-top: 1rem;
}

#moodChart {
    width: 100%;
    height: 100%;
}

/* 每日报告区域样式 */
#daily-report-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
}

#daily-report-content {
    min-height: 150px;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.report-item {
    border: 2px solid #FFD700; /* 原来的黄色边框 */
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.report-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.average-score {
    font-size: 1.2em;
    color: #007bff;
    font-weight: bold;
}

.tag-list {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.report-tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.suggestion {
    padding: 10px;
    background-color: #e8f5e8;
    border-left: 4px solid #4caf50;
    margin-top: 10px;
    border-radius: 4px;
}

#generate-daily-report {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    display: inline-block;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

#generate-daily-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(79, 172, 254, 0.3);
}

#export-markdown-report {
    background: linear-gradient(135deg, #20bf6b 0%, #00cc66 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    display: inline-block;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

#export-markdown-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(32, 191, 107, 0.3);
}

.report-buttons {
    text-align: center;
    margin-top: 1rem;
}
